home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 6 / The Arsenal Files 6 (Arsenal Computer).ISO / os2bbs / ftpfid16.zip / FTPRPT.CMD < prev    next >
OS/2 REXX Batch file  |  1995-12-17  |  862b  |  33 lines

  1. /* FTPRPT.CMD */
  2. ftplog = 'f:\bbs\logs\ftpfido.log'
  3. IF Stream(ftplog,'C', 'Query Exists') <>' ' Then
  4.   Do
  5.    rc = stream(ftplog,'C','open read')
  6. total_sent = 0
  7. total_rec = 0
  8. total_time = 0
  9. total_sec = 0
  10.    do until LINES(ftplog) = 0
  11.     line = LINEIN(ftplog)
  12.  
  13.     
  14.      If Pos(' $', line) = 1 then
  15.       Do
  16. parse var line sent sentmuch bytes dytes recmuch rest ters muchtime mo muchsec eee
  17. total_sent = total_sent + sentmuch
  18. total_rec = total_rec + recmuch
  19. total_time = total_time + muchtime
  20. total_sec = total_sec + muchsec
  21. if total_sec > 59 then do
  22. total_time = total_time + 1
  23. total_sec = total_sec - 60
  24.       end
  25.      end
  26.    end /* Do Until */
  27.    rc = stream(ftplog,'C','close')
  28. say 'Todays Stats: 'total_sent 'sent - 'total_rec 'recieved'
  29.        say total_time%60 'hours or 'total_time 'minutes 'total_sec 'secs'
  30. 'pause'
  31. end
  32.  
  33.